package com.feihong.txgw.utils;

import java.util.ArrayList;

/**
 * @author wangziheng
 * @name txgw_app
 * @class name：com.feihong.txgw.utils
 * @class describe:
 * @time 2018/4/12 18:30
 * @change
 * @chang time
 * @class describe
 */
public class AdapterData<T> {
    private int mItemLayout;
    private ArrayList<T> mData;
    private int mDataSize;
    public int getmItemLayout() {
        return mItemLayout;
    }

    public void setmItemLayout(int mItemLayout) {
        this.mItemLayout = mItemLayout;
    }

    public ArrayList<T> getmData() {
        return mData;
    }

    public void setmData(ArrayList<T> mData) {
        this.mData = mData;
        mDataSize = mData.size();
    }

    public int getDataSize(){
        return mDataSize;
    }

    public void setDataSize(int size){
        if(mData != null && size > mData.size()){
            throw new IndexOutOfBoundsException("目标数量不能大于集合的数量");
        }
    }
}
